package com.cskaoyan.market.controller;

import com.cskaoyan.market.service.MarketDashboardService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: 付诚
 * @Date: 2024/5/19 18:52
 * @Description:
 */

 @RestController
public class AdminDashboardController {
    @Autowired
    private MarketDashboardService adminDashboardService;

    @GetMapping("/admin/dashboard")
    public Object dashboard()  {
        Map<String, Integer> dashboardData = adminDashboardService.dashboard();
        return ResponseUtil.ok(dashboardData);
    }
}
